<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>코오롱</title>
<link rel="stylesheet" type="text/css" href="${requestScope.contextPath}/css/import.css" />
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/jquery-ui-1.8.14.custom/js/jquery-ui-1.8.14.custom.min.js"></script>
<script type="text/javascript" src="${requestScope.contextPath}/js/common.js"></script>
<c:set var="userAgent" value="${header['User-Agent']}" />
<fmt:setBundle basename="com.kolon.config.properties.config" var="config" />
<c:if test="${fn:indexOf(userAgent, 'Android') != -1}"><c:set var="platForm" value="Android" /></c:if>
<c:if test="${fn:indexOf(userAgent, 'iPhone') != -1}"><c:set var="platForm" value="iPhone" /></c:if>

<script type="text/javascript">
	function appBack() {
		document.location.href='#';
	}
</script>

<script type="text/javascript" src="${requestScope.contextPath}/js/cubiq-iscroll/iscroll.js"></script>
<script type="text/javascript">
var myScroll;
function loaded() {
	myScroll = new iScroll('wrapper', { 
		checkDOMChanges: true,
		zoom: false
	});
	<c:if test="${param.endY != null and param.endY != ''}">
		myScroll.scrollTo(0, ${param.endY}, 0);
		endY = ${param.endY};
	</c:if>
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
window.addEventListener('DOMContentLoaded', setTimeout(function () { loaded(); }, 200), false);
</script>


<style type="text/css" media="all">
#wrapper { position:absolute; z-index:1; top:145px; bottom:0px; left:0; width:100%; /*background:#aaa; */ overflow:auto; }
#scroller { position:absolute; z-index:1; /* -webkit-touch-callout:none;*/ -webkit-tap-highlight-color:rgba(0,0,0,0); width:100%; padding:0; background:#fff; }
</style>

</head>
<body>
	<div id="wrap">
		<div class="header">
			<h1>SERVICE DESK</h1>
			<c:choose>
	       	<c:when test="${approval eq 'True' and assignee eq 'False'}">
	       	<!-- 승인자 -->
			<ul class="tab2">
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequest.do"><img src="${requestScope.contextPath}/images/service/tab3_1.gif" alt="서비스요청" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do"><img src="${requestScope.contextPath}/images/service/tab3_2_over.gif" alt="요청현황" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskApplyList.do"><img src="${requestScope.contextPath}/images/service/tab3_3.gif" alt="승인대기" /></a></li>
				<!-- <li><a href="javascript:alert('승인대기 서비스는\n 추후 오픈예정 입니다.');"><img src="${requestScope.contextPath}/images/service/tab3_3.gif" alt="승인대기" /></a></li> -->
			</ul>
			</c:when>
			<c:when test="${approval eq 'False' and assignee eq 'True'}">
			<!-- 처리자 -->
			<ul class="tab2">
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequest.do"><img src="${requestScope.contextPath}/images/service/tab4_1.gif" alt="요청" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do"><img src="${requestScope.contextPath}/images/service/tab4_2_over.gif" alt="요청현황" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskProcessList.do"><img src="${requestScope.contextPath}/images/service/tab4_4.gif" alt="처리현황" /></a></li>
			</ul>
			</c:when>
			<c:when test="${approval eq 'True' and assignee eq 'True'}">
			<!-- 승인자/처리자 -->
			<ul class="tab2">
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequest.do"><img src="${requestScope.contextPath}/images/service/tab4_1.gif" alt="요청" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do"><img src="${requestScope.contextPath}/images/service/tab4_2_over.gif" alt="요청현황" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskApplyList.do"><img src="${requestScope.contextPath}/images/service/tab4_3.gif" alt="승인대기" /></a></li>
				<!-- <li><a href="javascript:alert('승인대기 서비스는\n 추후 오픈예정 입니다.');"><img src="${requestScope.contextPath}/images/service/tab4_3.gif" alt="승인대기" /></a></li> -->
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskProcessList.do"><img src="${requestScope.contextPath}/images/service/tab4_4.gif" alt="처리현황" /></a></li>
			</ul>
			</c:when>
			<c:otherwise>
			<!-- 공통 Tab -->
			<ul class="tab2">
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequest.do"><img src="${requestScope.contextPath}/images/service/tab2_1.gif" alt="서비스 요청" /></a></li>
				<li><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do"><img src="${requestScope.contextPath}/images/service/tab2_2_over.gif" alt="요청현황" /></a></li>
			</ul>
			</c:otherwise>
			</c:choose>
			<p class="service_btn"><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do?Status=ING"><img src="${requestScope.contextPath}/images/service/btn_ing<c:if test="${status eq 'ING'}">_on</c:if>.gif" alt="진행" /></a><a href="${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do?Status=CL"><img src="${requestScope.contextPath}/images/service/btn_end<c:if test="${status eq 'CL'}">_on</c:if>.gif" alt="종료" /></a></p>		
			</div><!-- // header -->
			<div id="wrapper" class="news">
			<div id="scroller">
				<ul>
					<c:forEach items="${mapList}" var="mapInfo" varStatus="status">
					<li>
						<a href="javascript:goUrl('${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestView.do?Ref_Num=${mapInfo.REF_NUM}&page=${page}&endY='+endY);"><span class="bold">${mapInfo.REQ_DESC}</span><span class="date1">요청:${mapInfo.OPEN_DATE} 납기:${mapInfo.PLAN_DATE}</span></a>
						<span class="ripply">
							<c:choose>
	       					<c:when test="${mapInfo.STATUS == '접수'}">
								<img src="${requestScope.contextPath}/images/btn/btn_receipt.gif" alt="접수" />
							</c:when>
							<c:when test="${mapInfo.STATUS == '진행'}">
								<img src="${requestScope.contextPath}/images/btn/btn_ongo.gif" alt="진행중" />
							</c:when>
							<c:when test="${mapInfo.STATUS == '종료'}">
								<img src="${requestScope.contextPath}/images/btn/btn_complete.gif" alt="완료" />
							</c:when>
							<c:otherwise>
								<img src="${requestScope.contextPath}/images/btn/btn_new.gif" alt="신규" />
							</c:otherwise>
							</c:choose>
						</span>
					</li>
					</c:forEach>
					
					<c:if test="${empty mapList}">
					<li>일치하는 자료가 없습니다.</li>
					</c:if>
				</ul>
				<c:if test="${totCnt > fn:length(mapList)}"> 
					<div class="btn_more11">
					<p class="more11"><a href="javascript:goUrl('${requestScope.contextPath}/business/mServiceDesk/mServiceDeskRequestList.do?Status=${status}&page=${page+1}&endY='+endY);">15개 더보기</a></p>
					<p class="more22"><a href="javascript:myScroll.scrollTo(0, 0, 0);"><img src="${requestScope.contextPath}/images/news/btn_top.gif" alt="맨위로" />&nbsp;&nbsp;맨위로</a></p>
					</div>
				</c:if>
			</div>
			</div>
	</div><!-- // wrap -->
	<script>
		window.HybridApp.clearAllHistory(); 
	</script>
</body>
</html>


